\(\int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx\) [106]

   Optimal result
   Rubi [A] (verified)
   Mathematica [A] (verified)
   Maple [A] (verified)
   Fricas [A] (verification not implemented)
   Sympy [F(-1)]
   Maxima [A] (verification not implemented)
   Giac [A] (verification not implemented)
   Mupad [B] (verification not implemented)

Optimal result

Integrand size = 28, antiderivative size = 177 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {a^5 \tan (c+d x)}{d}+\frac {5 a^4 b \tan ^2(c+d x)}{2 d}+\frac {a^3 \left (a^2+10 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {5 a^2 b \left (a^2+2 b^2\right ) \tan ^4(c+d x)}{4 d}+\frac {a b^2 \left (2 a^2+b^2\right ) \tan ^5(c+d x)}{d}+\frac {b^3 \left (10 a^2+b^2\right ) \tan ^6(c+d x)}{6 d}+\frac {5 a b^4 \tan ^7(c+d x)}{7 d}+\frac {b^5 \tan ^8(c+d x)}{8 d} \]

[Out]

a^5*tan(d*x+c)/d+5/2*a^4*b*tan(d*x+c)^2/d+1/3*a^3*(a^2+10*b^2)*tan(d*x+c)^3/d+5/4*a^2*b*(a^2+2*b^2)*tan(d*x+c)
^4/d+a*b^2*(2*a^2+b^2)*tan(d*x+c)^5/d+1/6*b^3*(10*a^2+b^2)*tan(d*x+c)^6/d+5/7*a*b^4*tan(d*x+c)^7/d+1/8*b^5*tan
(d*x+c)^8/d

Rubi [A] (verified)

Time = 0.18 (sec) , antiderivative size = 177, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.071, Rules used = {3167, 908} \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {a^5 \tan (c+d x)}{d}+\frac {5 a^4 b \tan ^2(c+d x)}{2 d}+\frac {a b^2 \left (2 a^2+b^2\right ) \tan ^5(c+d x)}{d}+\frac {5 a^2 b \left (a^2+2 b^2\right ) \tan ^4(c+d x)}{4 d}+\frac {b^3 \left (10 a^2+b^2\right ) \tan ^6(c+d x)}{6 d}+\frac {a^3 \left (a^2+10 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {5 a b^4 \tan ^7(c+d x)}{7 d}+\frac {b^5 \tan ^8(c+d x)}{8 d} \]

[In]

Int[Sec[c + d*x]^9*(a*Cos[c + d*x] + b*Sin[c + d*x])^5,x]

[Out]

(a^5*Tan[c + d*x])/d + (5*a^4*b*Tan[c + d*x]^2)/(2*d) + (a^3*(a^2 + 10*b^2)*Tan[c + d*x]^3)/(3*d) + (5*a^2*b*(
a^2 + 2*b^2)*Tan[c + d*x]^4)/(4*d) + (a*b^2*(2*a^2 + b^2)*Tan[c + d*x]^5)/d + (b^3*(10*a^2 + b^2)*Tan[c + d*x]
^6)/(6*d) + (5*a*b^4*Tan[c + d*x]^7)/(7*d) + (b^5*Tan[c + d*x]^8)/(8*d)

Rule 908

Int[((d_.) + (e_.)*(x_))^(m_)*((f_.) + (g_.)*(x_))^(n_)*((a_) + (c_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIn
tegrand[(d + e*x)^m*(f + g*x)^n*(a + c*x^2)^p, x], x] /; FreeQ[{a, c, d, e, f, g}, x] && NeQ[e*f - d*g, 0] &&
NeQ[c*d^2 + a*e^2, 0] && IntegerQ[p] && ((EqQ[p, 1] && IntegersQ[m, n]) || (ILtQ[m, 0] && ILtQ[n, 0]))

Rule 3167

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[-d^(-1), Subst[Int[x^m*((b + a*x)^n/(1 + x^2)^((m + n + 2)/2)), x], x, Cot[c + d*x]], x] /; FreeQ[
{a, b, c, d}, x] && IntegerQ[n] && IntegerQ[(m + n)/2] && NeQ[n, -1] &&  !(GtQ[n, 0] && GtQ[m, 1])

Rubi steps \begin{align*} \text {integral}& = -\frac {\text {Subst}\left (\int \frac {(b+a x)^5 \left (1+x^2\right )}{x^9} \, dx,x,\cot (c+d x)\right )}{d} \\ & = -\frac {\text {Subst}\left (\int \left (\frac {b^5}{x^9}+\frac {5 a b^4}{x^8}+\frac {10 a^2 b^3+b^5}{x^7}+\frac {5 a b^2 \left (2 a^2+b^2\right )}{x^6}+\frac {5 a^2 b \left (a^2+2 b^2\right )}{x^5}+\frac {a^5+10 a^3 b^2}{x^4}+\frac {5 a^4 b}{x^3}+\frac {a^5}{x^2}\right ) \, dx,x,\cot (c+d x)\right )}{d} \\ & = \frac {a^5 \tan (c+d x)}{d}+\frac {5 a^4 b \tan ^2(c+d x)}{2 d}+\frac {a^3 \left (a^2+10 b^2\right ) \tan ^3(c+d x)}{3 d}+\frac {5 a^2 b \left (a^2+2 b^2\right ) \tan ^4(c+d x)}{4 d}+\frac {a b^2 \left (2 a^2+b^2\right ) \tan ^5(c+d x)}{d}+\frac {b^3 \left (10 a^2+b^2\right ) \tan ^6(c+d x)}{6 d}+\frac {5 a b^4 \tan ^7(c+d x)}{7 d}+\frac {b^5 \tan ^8(c+d x)}{8 d} \\ \end{align*}

Mathematica [A] (verified)

Time = 0.49 (sec) , antiderivative size = 54, normalized size of antiderivative = 0.31 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {(a+b \tan (c+d x))^6 \left (a^2+28 b^2-6 a b \tan (c+d x)+21 b^2 \tan ^2(c+d x)\right )}{168 b^3 d} \]

[In]

Integrate[Sec[c + d*x]^9*(a*Cos[c + d*x] + b*Sin[c + d*x])^5,x]

[Out]

((a + b*Tan[c + d*x])^6*(a^2 + 28*b^2 - 6*a*b*Tan[c + d*x] + 21*b^2*Tan[c + d*x]^2))/(168*b^3*d)

Maple [A] (verified)

Time = 2.19 (sec) , antiderivative size = 209, normalized size of antiderivative = 1.18

method result size
parts \(-\frac {a^{5} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )}{d}+\frac {b^{5} \left (\frac {\sec \left (d x +c \right )^{8}}{8}-\frac {\sec \left (d x +c \right )^{6}}{3}+\frac {\sec \left (d x +c \right )^{4}}{4}\right )}{d}+\frac {10 a^{3} b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \sin \left (d x +c \right )^{3}}{15 \cos \left (d x +c \right )^{3}}\right )}{d}+\frac {5 a \,b^{4} \left (\frac {\sin \left (d x +c \right )^{5}}{7 \cos \left (d x +c \right )^{7}}+\frac {2 \sin \left (d x +c \right )^{5}}{35 \cos \left (d x +c \right )^{5}}\right )}{d}+\frac {10 a^{2} b^{3} \left (\frac {\sec \left (d x +c \right )^{6}}{6}-\frac {\sec \left (d x +c \right )^{4}}{4}\right )}{d}+\frac {5 a^{4} b \sec \left (d x +c \right )^{4}}{4 d}\) \(209\)
derivativedivides \(\frac {-a^{5} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+\frac {5 a^{4} b}{4 \cos \left (d x +c \right )^{4}}+10 a^{3} b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \sin \left (d x +c \right )^{3}}{15 \cos \left (d x +c \right )^{3}}\right )+10 a^{2} b^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{4}}{12 \cos \left (d x +c \right )^{4}}\right )+5 a \,b^{4} \left (\frac {\sin \left (d x +c \right )^{5}}{7 \cos \left (d x +c \right )^{7}}+\frac {2 \sin \left (d x +c \right )^{5}}{35 \cos \left (d x +c \right )^{5}}\right )+b^{5} \left (\frac {\sin \left (d x +c \right )^{6}}{8 \cos \left (d x +c \right )^{8}}+\frac {\sin \left (d x +c \right )^{6}}{24 \cos \left (d x +c \right )^{6}}\right )}{d}\) \(217\)
default \(\frac {-a^{5} \left (-\frac {2}{3}-\frac {\sec \left (d x +c \right )^{2}}{3}\right ) \tan \left (d x +c \right )+\frac {5 a^{4} b}{4 \cos \left (d x +c \right )^{4}}+10 a^{3} b^{2} \left (\frac {\sin \left (d x +c \right )^{3}}{5 \cos \left (d x +c \right )^{5}}+\frac {2 \sin \left (d x +c \right )^{3}}{15 \cos \left (d x +c \right )^{3}}\right )+10 a^{2} b^{3} \left (\frac {\sin \left (d x +c \right )^{4}}{6 \cos \left (d x +c \right )^{6}}+\frac {\sin \left (d x +c \right )^{4}}{12 \cos \left (d x +c \right )^{4}}\right )+5 a \,b^{4} \left (\frac {\sin \left (d x +c \right )^{5}}{7 \cos \left (d x +c \right )^{7}}+\frac {2 \sin \left (d x +c \right )^{5}}{35 \cos \left (d x +c \right )^{5}}\right )+b^{5} \left (\frac {\sin \left (d x +c \right )^{6}}{8 \cos \left (d x +c \right )^{8}}+\frac {\sin \left (d x +c \right )^{6}}{24 \cos \left (d x +c \right )^{6}}\right )}{d}\) \(217\)
risch \(\frac {-40 a^{2} b^{3} {\mathrm e}^{12 i \left (d x +c \right )}+20 a^{4} b \,{\mathrm e}^{12 i \left (d x +c \right )}-\frac {128 i a^{3} b^{2} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+\frac {32 i a \,b^{4} {\mathrm e}^{2 i \left (d x +c \right )}}{7}-\frac {320 i a^{3} b^{2} {\mathrm e}^{10 i \left (d x +c \right )}}{3}+4 b^{5} {\mathrm e}^{12 i \left (d x +c \right )}-\frac {280 i a^{3} b^{2} {\mathrm e}^{8 i \left (d x +c \right )}}{3}+20 i a \,b^{4} {\mathrm e}^{8 i \left (d x +c \right )}-\frac {104 i a^{3} b^{2} {\mathrm e}^{4 i \left (d x +c \right )}}{3}-4 i a \,b^{4} {\mathrm e}^{4 i \left (d x +c \right )}-\frac {64 i a^{3} b^{2} {\mathrm e}^{2 i \left (d x +c \right )}}{3}+32 i a \,b^{4} {\mathrm e}^{6 i \left (d x +c \right )}-\frac {16 b^{5} {\mathrm e}^{10 i \left (d x +c \right )}}{3}-\frac {16 b^{5} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+\frac {4 i a^{5}}{3}+4 b^{5} {\mathrm e}^{4 i \left (d x +c \right )}+\frac {40 b^{5} {\mathrm e}^{8 i \left (d x +c \right )}}{3}+4 i a^{5} {\mathrm e}^{12 i \left (d x +c \right )}+\frac {64 i a^{5} {\mathrm e}^{10 i \left (d x +c \right )}}{3}+\frac {140 i a^{5} {\mathrm e}^{8 i \left (d x +c \right )}}{3}+\frac {160 i a^{5} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+\frac {100 i a^{5} {\mathrm e}^{4 i \left (d x +c \right )}}{3}+\frac {32 i a^{5} {\mathrm e}^{2 i \left (d x +c \right )}}{3}-\frac {8 i a^{3} b^{2}}{3}+\frac {4 i a \,b^{4}}{7}-40 a^{2} b^{3} {\mathrm e}^{4 i \left (d x +c \right )}-\frac {160 a^{2} b^{3} {\mathrm e}^{6 i \left (d x +c \right )}}{3}+20 a^{4} b \,{\mathrm e}^{4 i \left (d x +c \right )}-\frac {80 a^{2} b^{3} {\mathrm e}^{8 i \left (d x +c \right )}}{3}+80 a^{4} b \,{\mathrm e}^{6 i \left (d x +c \right )}-\frac {160 a^{2} b^{3} {\mathrm e}^{10 i \left (d x +c \right )}}{3}+120 a^{4} b \,{\mathrm e}^{8 i \left (d x +c \right )}+80 a^{4} b \,{\mathrm e}^{10 i \left (d x +c \right )}-40 i a^{3} b^{2} {\mathrm e}^{12 i \left (d x +c \right )}+20 i a \,b^{4} {\mathrm e}^{12 i \left (d x +c \right )}}{d \left ({\mathrm e}^{2 i \left (d x +c \right )}+1\right )^{8}}\) \(550\)
parallelrisch \(-\frac {2 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) \left (301 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} a^{5}-455 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a^{5}+455 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} a^{5}-112 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} b^{5}-301 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a^{5}+119 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a^{5}-21 a^{5}-735 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} a^{4} b +560 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{5} a^{2} b^{3}+728 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a^{3} b^{2}-336 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{4} a \,b^{4}+420 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{4} b -420 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3} a^{2} b^{3}-280 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2} a^{3} b^{2}-105 \tan \left (\frac {d x}{2}+\frac {c}{2}\right ) a^{4} b +784 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a^{3} b^{2}-735 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} a^{4} b -280 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} a^{2} b^{3}+840 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} a^{4} b -784 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} a^{3} b^{2}+48 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{6} a \,b^{4}+21 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{14} a^{5}-119 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12} a^{5}-112 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} b^{5}-112 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{7} b^{5}-105 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{13} a^{4} b +280 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{12} a^{3} b^{2}+420 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11} a^{4} b -420 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{11} a^{2} b^{3}-728 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} a^{3} b^{2}+336 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{10} a \,b^{4}+560 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{9} a^{2} b^{3}-48 \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{8} a \,b^{4}\right )}{21 d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{2}-1\right )^{8}}\) \(590\)

[In]

int(sec(d*x+c)^9*(cos(d*x+c)*a+b*sin(d*x+c))^5,x,method=_RETURNVERBOSE)

[Out]

-a^5/d*(-2/3-1/3*sec(d*x+c)^2)*tan(d*x+c)+b^5/d*(1/8*sec(d*x+c)^8-1/3*sec(d*x+c)^6+1/4*sec(d*x+c)^4)+10*a^3*b^
2/d*(1/5*sin(d*x+c)^3/cos(d*x+c)^5+2/15*sin(d*x+c)^3/cos(d*x+c)^3)+5*a*b^4/d*(1/7*sin(d*x+c)^5/cos(d*x+c)^7+2/
35*sin(d*x+c)^5/cos(d*x+c)^5)+10*a^2*b^3/d*(1/6*sec(d*x+c)^6-1/4*sec(d*x+c)^4)+5/4*a^4*b*sec(d*x+c)^4/d

Fricas [A] (verification not implemented)

none

Time = 0.26 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.99 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {21 \, b^{5} + 42 \, {\left (5 \, a^{4} b - 10 \, a^{2} b^{3} + b^{5}\right )} \cos \left (d x + c\right )^{4} + 56 \, {\left (5 \, a^{2} b^{3} - b^{5}\right )} \cos \left (d x + c\right )^{2} + 8 \, {\left (2 \, {\left (7 \, a^{5} - 14 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \cos \left (d x + c\right )^{7} + 15 \, a b^{4} \cos \left (d x + c\right ) + {\left (7 \, a^{5} - 14 \, a^{3} b^{2} + 3 \, a b^{4}\right )} \cos \left (d x + c\right )^{5} + 6 \, {\left (7 \, a^{3} b^{2} - 4 \, a b^{4}\right )} \cos \left (d x + c\right )^{3}\right )} \sin \left (d x + c\right )}{168 \, d \cos \left (d x + c\right )^{8}} \]

[In]

integrate(sec(d*x+c)^9*(a*cos(d*x+c)+b*sin(d*x+c))^5,x, algorithm="fricas")

[Out]

1/168*(21*b^5 + 42*(5*a^4*b - 10*a^2*b^3 + b^5)*cos(d*x + c)^4 + 56*(5*a^2*b^3 - b^5)*cos(d*x + c)^2 + 8*(2*(7
*a^5 - 14*a^3*b^2 + 3*a*b^4)*cos(d*x + c)^7 + 15*a*b^4*cos(d*x + c) + (7*a^5 - 14*a^3*b^2 + 3*a*b^4)*cos(d*x +
 c)^5 + 6*(7*a^3*b^2 - 4*a*b^4)*cos(d*x + c)^3)*sin(d*x + c))/(d*cos(d*x + c)^8)

Sympy [F(-1)]

Timed out. \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\text {Timed out} \]

[In]

integrate(sec(d*x+c)**9*(a*cos(d*x+c)+b*sin(d*x+c))**5,x)

[Out]

Timed out

Maxima [A] (verification not implemented)

none

Time = 0.23 (sec) , antiderivative size = 223, normalized size of antiderivative = 1.26 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {56 \, {\left (\tan \left (d x + c\right )^{3} + 3 \, \tan \left (d x + c\right )\right )} a^{5} + 112 \, {\left (3 \, \tan \left (d x + c\right )^{5} + 5 \, \tan \left (d x + c\right )^{3}\right )} a^{3} b^{2} + 24 \, {\left (5 \, \tan \left (d x + c\right )^{7} + 7 \, \tan \left (d x + c\right )^{5}\right )} a b^{4} - \frac {140 \, {\left (3 \, \sin \left (d x + c\right )^{2} - 1\right )} a^{2} b^{3}}{\sin \left (d x + c\right )^{6} - 3 \, \sin \left (d x + c\right )^{4} + 3 \, \sin \left (d x + c\right )^{2} - 1} + \frac {7 \, {\left (6 \, \sin \left (d x + c\right )^{4} - 4 \, \sin \left (d x + c\right )^{2} + 1\right )} b^{5}}{\sin \left (d x + c\right )^{8} - 4 \, \sin \left (d x + c\right )^{6} + 6 \, \sin \left (d x + c\right )^{4} - 4 \, \sin \left (d x + c\right )^{2} + 1} + \frac {210 \, a^{4} b}{{\left (\sin \left (d x + c\right )^{2} - 1\right )}^{2}}}{168 \, d} \]

[In]

integrate(sec(d*x+c)^9*(a*cos(d*x+c)+b*sin(d*x+c))^5,x, algorithm="maxima")

[Out]

1/168*(56*(tan(d*x + c)^3 + 3*tan(d*x + c))*a^5 + 112*(3*tan(d*x + c)^5 + 5*tan(d*x + c)^3)*a^3*b^2 + 24*(5*ta
n(d*x + c)^7 + 7*tan(d*x + c)^5)*a*b^4 - 140*(3*sin(d*x + c)^2 - 1)*a^2*b^3/(sin(d*x + c)^6 - 3*sin(d*x + c)^4
 + 3*sin(d*x + c)^2 - 1) + 7*(6*sin(d*x + c)^4 - 4*sin(d*x + c)^2 + 1)*b^5/(sin(d*x + c)^8 - 4*sin(d*x + c)^6
+ 6*sin(d*x + c)^4 - 4*sin(d*x + c)^2 + 1) + 210*a^4*b/(sin(d*x + c)^2 - 1)^2)/d

Giac [A] (verification not implemented)

none

Time = 0.58 (sec) , antiderivative size = 176, normalized size of antiderivative = 0.99 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {21 \, b^{5} \tan \left (d x + c\right )^{8} + 120 \, a b^{4} \tan \left (d x + c\right )^{7} + 280 \, a^{2} b^{3} \tan \left (d x + c\right )^{6} + 28 \, b^{5} \tan \left (d x + c\right )^{6} + 336 \, a^{3} b^{2} \tan \left (d x + c\right )^{5} + 168 \, a b^{4} \tan \left (d x + c\right )^{5} + 210 \, a^{4} b \tan \left (d x + c\right )^{4} + 420 \, a^{2} b^{3} \tan \left (d x + c\right )^{4} + 56 \, a^{5} \tan \left (d x + c\right )^{3} + 560 \, a^{3} b^{2} \tan \left (d x + c\right )^{3} + 420 \, a^{4} b \tan \left (d x + c\right )^{2} + 168 \, a^{5} \tan \left (d x + c\right )}{168 \, d} \]

[In]

integrate(sec(d*x+c)^9*(a*cos(d*x+c)+b*sin(d*x+c))^5,x, algorithm="giac")

[Out]

1/168*(21*b^5*tan(d*x + c)^8 + 120*a*b^4*tan(d*x + c)^7 + 280*a^2*b^3*tan(d*x + c)^6 + 28*b^5*tan(d*x + c)^6 +
 336*a^3*b^2*tan(d*x + c)^5 + 168*a*b^4*tan(d*x + c)^5 + 210*a^4*b*tan(d*x + c)^4 + 420*a^2*b^3*tan(d*x + c)^4
 + 56*a^5*tan(d*x + c)^3 + 560*a^3*b^2*tan(d*x + c)^3 + 420*a^4*b*tan(d*x + c)^2 + 168*a^5*tan(d*x + c))/d

Mupad [B] (verification not implemented)

Time = 27.56 (sec) , antiderivative size = 419, normalized size of antiderivative = 2.37 \[ \int \sec ^9(c+d x) (a \cos (c+d x)+b \sin (c+d x))^5 \, dx=\frac {{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5\,\left (\frac {86\,a^5}{3}-\frac {208\,a^3\,b^2}{3}+32\,a\,b^4\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4\,\left (40\,a^4\,b-40\,a^2\,b^3\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{12}\,\left (40\,a^4\,b-40\,a^2\,b^3\right )-2\,a^5\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{15}-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}\,\left (\frac {86\,a^5}{3}-\frac {208\,a^3\,b^2}{3}+32\,a\,b^4\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7\,\left (\frac {130\,a^5}{3}-\frac {224\,a^3\,b^2}{3}+\frac {32\,a\,b^4}{7}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9\,\left (\frac {130\,a^5}{3}-\frac {224\,a^3\,b^2}{3}+\frac {32\,a\,b^4}{7}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8\,\left (-80\,a^4\,b+\frac {80\,a^2\,b^3}{3}+\frac {32\,b^5}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6\,\left (70\,a^4\,b-\frac {160\,a^2\,b^3}{3}+\frac {32\,b^5}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}\,\left (70\,a^4\,b-\frac {160\,a^2\,b^3}{3}+\frac {32\,b^5}{3}\right )-{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\,\left (\frac {34\,a^5}{3}-\frac {80\,a^3\,b^2}{3}\right )+{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{13}\,\left (\frac {34\,a^5}{3}-\frac {80\,a^3\,b^2}{3}\right )+2\,a^5\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+10\,a^4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+10\,a^4\,b\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{14}}{d\,{\left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2-1\right )}^8} \]

[In]

int((a*cos(c + d*x) + b*sin(c + d*x))^5/cos(c + d*x)^9,x)

[Out]

(tan(c/2 + (d*x)/2)^5*(32*a*b^4 + (86*a^5)/3 - (208*a^3*b^2)/3) - tan(c/2 + (d*x)/2)^4*(40*a^4*b - 40*a^2*b^3)
 - tan(c/2 + (d*x)/2)^12*(40*a^4*b - 40*a^2*b^3) - 2*a^5*tan(c/2 + (d*x)/2)^15 - tan(c/2 + (d*x)/2)^11*(32*a*b
^4 + (86*a^5)/3 - (208*a^3*b^2)/3) - tan(c/2 + (d*x)/2)^7*((32*a*b^4)/7 + (130*a^5)/3 - (224*a^3*b^2)/3) + tan
(c/2 + (d*x)/2)^9*((32*a*b^4)/7 + (130*a^5)/3 - (224*a^3*b^2)/3) + tan(c/2 + (d*x)/2)^8*((32*b^5)/3 - 80*a^4*b
 + (80*a^2*b^3)/3) + tan(c/2 + (d*x)/2)^6*(70*a^4*b + (32*b^5)/3 - (160*a^2*b^3)/3) + tan(c/2 + (d*x)/2)^10*(7
0*a^4*b + (32*b^5)/3 - (160*a^2*b^3)/3) - tan(c/2 + (d*x)/2)^3*((34*a^5)/3 - (80*a^3*b^2)/3) + tan(c/2 + (d*x)
/2)^13*((34*a^5)/3 - (80*a^3*b^2)/3) + 2*a^5*tan(c/2 + (d*x)/2) + 10*a^4*b*tan(c/2 + (d*x)/2)^2 + 10*a^4*b*tan
(c/2 + (d*x)/2)^14)/(d*(tan(c/2 + (d*x)/2)^2 - 1)^8)